<template>
    <keep-alive :include="keepAliveList">
        <router-view/>

    </keep-alive>
</template>


<script>
export default {
  name: 'RouteView',
  props: {
    keepAlive: {
      type: Boolean,
      default: true
    }
  },
  data () {
    return {
       keepAliveList: this.$store.state.tabPathList.componentNames||[]
    }
        
  },
  computed: {
    // 获取缓存列表
    getKeepAliveList () {
        return this.$store.state.tabPathList.componentNames || []
    }
  },
  watch: {
    getKeepAliveList (n, o) {
      this.keepAliveList = n
    }
  }

 
 
}
</script>
